package cn.richx.pushmessage.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Properties specific to Pushmessage.
 * <p>
 * Properties are configured in the application.yml file.
 * See {@link io.github.jhipster.config.JHipsterProperties} for a good example.
 */
@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
public class ApplicationProperties {

    private Push push;

    private String name;


    public Push getPush() {
        return push;
    }

    public void setPush(Push push) {
        this.push = push;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 推送相关配置
     * */
    public static class Push {
        private String apiKey;
        private String secretKey;
        private String iosApiKey;
        private String iosSecretKey;
        private int messageSurvivalTime;
        private int environment;    // 1. 开发环境 2. 生产环境

        public String getApiKey() {
            return apiKey;
        }

        public void setApiKey(String apiKey) {
            this.apiKey = apiKey;
        }

        public String getSecretKey() {
            return secretKey;
        }

        public void setSecretKey(String secretKey) {
            this.secretKey = secretKey;
        }

        public String getIosApiKey() {
            return iosApiKey;
        }

        public void setIosApiKey(String iosApiKey) {
            this.iosApiKey = iosApiKey;
        }

        public String getIosSecretKey() {
            return iosSecretKey;
        }

        public void setIosSecretKey(String iosSecretKey) {
            this.iosSecretKey = iosSecretKey;
        }

        public int getMessageSurvivalTime() {
            return messageSurvivalTime;
        }

        public void setMessageSurvivalTime(int messageSurvivalTime) {
            this.messageSurvivalTime = messageSurvivalTime;
        }

        public int getEnvironment() {
            return environment;
        }

        public void setEnvironment(int environment) {
            this.environment = environment;
        }
    }
}
